import SetupWizard,LicenseDialog,WelcomeDialog

def Show(force=1,select_tutorial=1):
	if LicenseDialog.gLicenseDialog and force and select_tutorial:
		# show the wizard when the user finished the LicenseDialog
		LicenseDialog.gLizenseDoneFunc=Show
		return
	WelcomeDialog.Show(force)
	#SetupWizard.Show(force,select_tutorial)
	
def ShowNoLicense():
	if SetupWizard.gInWizard:
		return
	ShowNoParserLicense("SNiFF")

def ShowNoParserLicense(tool,msg=''):
	#print 'ShowNoLicense:',LicenseDialog.gLicenseDialog
	if not LicenseDialog.gLicenseDialog:
		reload(LicenseDialog)
	LicenseDialog.Show(tool,msg)

def HideAllDialogs():
	LicenseDialog.Hide()

def ShowLicenseDialog():
	#print 'ShowLicenseDialog:',LicenseDialog.gLicenseDialog
	ShowNoLicense()
	#return 0 # 0 = show builtin dialog
	return 1
#WelcomeDialog.Show()

